from django.urls import path, include
from rest_framework.routers import DefaultRouter
from .views_city import CityViewSet
from .views_room import RoomViewSet
from .views_device import DeviceViewSet
from .views_ping import PingHost
from django.utils import timezone

current_time = timezone.now()
print(current_time)

router = DefaultRouter()
router.register(r'city', CityViewSet, basename='city')
router.register(r'room', RoomViewSet, basename='room')
router.register(r'device', DeviceViewSet, basename='device')

urlpatterns = [
    path('', include(router.urls)),
    path('ping/<str:ip_address>/', PingHost),
]

